#include<stdio.h>
int main()
{
int i,count=1;
scanf("%d",&i);
do{
if((i%2)!=0)
{
count++;
}
i=i/2;
}while(i>=1);
printf("%d\n",count);
return 0;
}
